/*
 * @Author: benchenchuang benchenchuang
 * @Date: 2023-05-30 18:48:43
 * @LastEditors: benchenchuang benchenchuang
 * @LastEditTime: 2023-10-08 21:46:34
 * @FilePath: /hmp-web/src/api/construction/scheme/index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from '@/utils/request';

/**
 * @description 查询列表
 */
export const remoteList = params => {
    return request.get('/sys/SchemeCollect/query', params);
};
/**
 * 施工方案列表点击查看详情
 * @param {*} id 
 * @returns 
 */
export const remoteDetail = id=>{
    return request.get(`/sys/SchemeCollect/queryDetail?id=${id}`);
}
/**
 * 添加
 */
export const addInfo = data => {
    return request.post(`/sys/SchemeCollect/insert`, data);
};

/**
 * 更新
 */
export const updateInfo = data => {
    return request.post('/sys/SchemeCollect/update', data);
};

/**删除 */
export const deleteInfo = data => {
    return request.post(`/sys/SchemeCollect/delete`, data);
};

/**
 * 导入
 */
export const importSchemeData = data =>{
    return request.post(`/sys/SchemeCollect/importScheme`,data)
}

/**下载工单 */
export const remoteDownloadScheme = () => {
    return request.get(`/sys/worker/downLoadFileTemplate?fileName=scheme.xlsx`,{}, 'blob')
}

export default {
    remoteList
};
